package com.example.demo.core.handler.exception;

import com.example.demo.core.exception.ServiceException;
import com.example.demo.core.exception.StatusCode;
import lombok.Data;

@Data
public class ExceptionInfoBO {
    private  int status;
    private  String message;
    public ExceptionInfoBO(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public ExceptionInfoBO(StatusCode statusCode) {
        this.status = statusCode.getCode();
        this.message = statusCode.getDesc();
    }

    public ExceptionInfoBO(ServiceException e) {
        this.status = e.getStatus();
        this.message = e.getMessage();
    }
}
